#ifndef LOG_H_INCLUDED
#define LOG_H_INCLUDED

#include "Typedef.h"

#define LOG_CONTENT_LENGTH 255

#define LOG_LEVEL_INFO 0
#define LOG_LEVEL_WARN  1
#define LOG_LEVEL_ERROR 2
#define LOG_LEVEL_DEBUG 3

class Log
{
public:
    Log(Bpchar path);
    ~Log();

    BPcode Writeln(uint32_t level, char* ctt,...);
    BPcode ReadLog();
    Bpchar GetLogContentPtr();

private:
    Log();

    BPcode OpenLog();
    BPcode CloseLog();

private:
    string LogFilePath;
    FILE* Handle;
    Bchar Content[LOG_CONTENT_LENGTH];
};

#endif // LOG_H_INCLUDED
